package jifenbao.com.jifenbao;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import jifenbao.com.jifenbao.dialog.DialogForRedeem;
import jifenbao.com.widget.ActionBar.TestActionBar;

/**
 * Created by longteng on 2016-5-19.
 */
public class MainLauncherActivity extends Activity{
    private Button button1,button2,button3,button4,button5,button6,button7,button10;
    private Button button8;
    private Button button9;
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        button1 = (Button)findViewById(R.id.btn1);
        button2 = (Button)findViewById(R.id.btn2);
        button3 = (Button)findViewById(R.id.btn3);
        button4 = (Button)findViewById(R.id.btn4);
        button5 = (Button)findViewById(R.id.btn5);
        button6 = (Button)findViewById(R.id.btn6);
        button7 = (Button)findViewById(R.id.btn7);

        button8 = (Button)findViewById(R.id.btn8);

        button9 = (Button)findViewById(R.id.btn9);

        button10 = (Button)findViewById(R.id.btn10);

        button1.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(MainLauncherActivity.this,RedeemPointActivity.class);
                startActivity(intent);
            }
        });
        Listener2();
        Listener3();
        Listener4();
        Listener5();
        Listener6();
        Listener7();
        Listener8();
        Listener9();
        Listener10();
//        new DialogForRedeem(MainLauncherActivity.this).show();
    }

    public void Listener2(){
        button2.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent saveIntent = new Intent(MainLauncherActivity.this,UserInfoActivity.class);
                startActivity(saveIntent);
            }
        });
    }

    public void Listener3(){
        button3.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent3 = new Intent(MainLauncherActivity.this,PointRecordList.class);
                startActivity(intent3);
            }
        });
    }

    public void Listener4(){
        button4.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent4 = new Intent(MainLauncherActivity.this,ShopList.class);
                startActivity(intent4);
            }
        });
    }

    public void Listener5(){
        button5.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent5 = new Intent(MainLauncherActivity.this,ShopTicket.class);
                startActivity(intent5);
            }
        });
    }

//    public void alertDialog(View view){
//
//    }
    public void Listener6(){
        button6.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent6 = new Intent(MainLauncherActivity.this,PhoneNumber.class);
                startActivity(intent6);
            }
        });
    }

    public void Listener7(){
        button7.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent7 = new Intent(MainLauncherActivity.this,WalletActivity.class);
                startActivity(intent7);
            }
        });
    }

    public void Listener8(){
        button8.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent8 = new Intent(MainLauncherActivity.this, TestActionBar.class);
                startActivity(intent8);
            }
        });
    }

    public void Listener9(){
        button9.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent9 = new Intent(MainLauncherActivity.this, ViewPagerTest.class);
                startActivity(intent9);
            }
        });
    }

    public void Listener10(){
        button10.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent10 = new Intent(MainLauncherActivity.this, VipCenterActivity.class);
                startActivity(intent10);
            }
        });
    }
}
